package com.zb.sannuo.common.domain.search;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 消费者检测频次排行
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class JCFrequency implements Serializable {

    private static final long serialVersionUID = 8496039406556244624L;

    private String name;
    private Integer sex;
    private String IdCard;
    private String phone;
    private Integer countOfTest;  // 检测次数
    private String headStore;  // 总店名称
    private String subStore;  // 分店名称
    private Integer number;  // 检测人数
    private Integer errorNumber;  // 异常人数

   public String getException(){  // 指标异常率
       if(this.errorNumber != null && this.number != null){
           return ((Double.valueOf(this.errorNumber) / Double.valueOf(this.number) * 100) + "%");
       }
       return null;
   }

    private Integer avgAge; // 平均年龄
    private Integer weeks;  // 周几

    private String medicalName;  // 指标
    private Integer lowCriterionNumber;  // 低于标准值人数
    private Integer highCriterionNumber;  // 高于标准值人数

    private Integer hours; // 时间段

    private String age1;
    private String age2;
    private String age3;
    private String age4;
    private String age5;
    private String age6;
    private String age7;


}
